package util;

import java.util.List;

public class ArticleDataImpl implements ArticleData{

	private List<String> originalsTitles;
	private List<String> translatedTexts;
	private List<String> originalsTexts;
	private List<String> urlsList;
	
	public ArticleDataImpl(){
		
	}
	
	public ArticleDataImpl(List<String> originalTitle, List<String> translatedTexts, List<String> originalTexts, List<String> urlsList) {
		super();
		this.originalsTitles = originalTitle;
		this.translatedTexts = translatedTexts;
		this.originalsTexts = originalTexts;
		this.urlsList = urlsList;
	}

	public List<String> getOriginalsTitles() {
		return originalsTitles;
	}
	
	public List<String> getOriginalsTexts() {
		return originalsTexts;
	}
	
	public List<String> getTranslatedTexts() {
		return translatedTexts;
	}

	public List<String> getUrlList() {
		return urlsList;
	}

	public void setOriginalsTitles(List<String> originalsTitles) {
		this.originalsTitles = originalsTitles;
	}

	public void setTranslatedTexts(List<String> translatedTexts) {
		this.translatedTexts = translatedTexts;
	}

	public void setOriginalsTexts(List<String> originalsTexts) {
		this.originalsTexts = originalsTexts;
	}
	
	public void setUrlList(List<String> urlList) {
		this.urlsList = urlList;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((originalsTexts == null) ? 0 : originalsTexts.hashCode());
		result = prime * result
				+ ((originalsTitles == null) ? 0 : originalsTitles.hashCode());
		result = prime * result
				+ ((translatedTexts == null) ? 0 : translatedTexts.hashCode());
		result = prime * result
				+ ((urlsList == null) ? 0 : urlsList.hashCode());
		return result;
	}

	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ArticleDataImpl other = (ArticleDataImpl) obj;
		if (originalsTexts == null) {
			if (other.originalsTexts != null)
				return false;
		} else if (!originalsTexts.equals(other.originalsTexts))
			return false;
		if (originalsTitles == null) {
			if (other.originalsTitles != null)
				return false;
		} else if (!originalsTitles.equals(other.originalsTitles))
			return false;
		if (translatedTexts == null) {
			if (other.translatedTexts != null)
				return false;
		} else if (!translatedTexts.equals(other.translatedTexts))
			return false;
		if (urlsList == null) {
			if (other.urlsList != null)
				return false;
		} else if (!urlsList.equals(other.urlsList))
			return false;
		return true;
	}

	public String toString() {
		return "ArticleDataImpl [originalsTitles=" + originalsTitles
				+ ", translatedTexts=" + translatedTexts + ", originalsTexts="
				+ originalsTexts + ", urlsList=" + urlsList + "]";
	}
	

}